package com.bite.javaSEreview.j20240709;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        System.out.println("读入年龄：");
        int age = scan.nextInt();
        System.out.println(age);

        scan.nextLine();

        System.out.println("读入姓名：");
        String name = scan.nextLine();
        System.out.println(name);

        System.out.println("读入工资");
        float money = scan.nextFloat();
        System.out.println(money);

        scan.close();
    }
    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("读入姓名：");
        String name = scan.nextLine();
        //String name = scan.next();//遇到空格之后 读取结束
        System.out.println(name);
        System.out.println("读入年龄：");
        int age = scan.nextInt();
        System.out.println(age);

        System.out.println("读入工资");
        float money = scan.nextFloat();
        System.out.println(money);

        scan.close();
    }

    public static void main2(String[] args) {
        String str = "haha";
        switch (str) {
            case "1":
                System.out.println("1");
                break;
            case "2":
                System.out.println("2");
                break;
            case "3":
                System.out.println("3");
                break;
            default:
                System.out.println("输入有误！");
                break;
        }
    }
        public static void main1 (String[]args){
            System.out.println(5 / 2);
            System.out.println(5 / 2.0);
            System.out.println(5.0 / 2.0);
            System.out.println(10 % 3);
            System.out.println(10 % -3);
            System.out.println(-10 % -3);
            System.out.println(-10 % 3);

            System.out.println(11.5 % 2);

        }
}
